Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Fix can't match array of numbers #463

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

tienvx
Copy link
Contributor

@tienvx tienvx commented Sep 6, 2024

Before the fix:

2024-09-06T04:24:10.924510Z DEBUG tokio-runtime-worker pact_matching: --> Mismatches: [BodyMismatch { path: "$.$.age", expected: Some(b"[\"27\"]"), actual: Some(b"[\"41\"]"), mismatch: "Unable to match [\"27\"] using Number" }]

After the fix:

2024-09-06T04:18:29.737113Z DEBUG tokio-runtime-worker pact_matching::matchingrules: Comparing '["27"]' to '["41"]' using Number -> Ok(())
2024-09-06T04:18:29.737122Z DEBUG tokio-runtime-worker pact_matching::matchingrules: Comparing list item 0 with value 'Some("41")' to '"27"'
2024-09-06T04:18:29.737147Z DEBUG tokio-runtime-worker pact_matching::matchers: String -> String: comparing '27' to '41' ==> true cascaded=true matcher=Number

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant